package com.pcbly.web.components.utils;

import java.util.List;

import com.pcbly.web.components.jsontools.JSONArray;
import com.pcbly.web.components.jsontools.JSONObject;
 

public class ConvertToJson {
	public static String ConverListToJson(List<?> list) {
		JSONArray jsonArray = new JSONArray();
		JSONObject jsonObject = null;
		for (Object treeNode : list) {
			jsonObject = new JSONObject(treeNode);
			jsonArray.put(jsonObject);
		}
		String json = jsonArray.toString();
		return json;
	}
}
